package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.io.Serializable;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * EdErroresDet generated by hbm2java
 */
@Entity
@Table(name = "ED_ERRORES_DET", schema = "EDADEPUDOC")
public class EdErroresDet implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -12953567026321219L;
	private EdErroresDetId id;
	private EdErrores edErrores;
	private String xinconsistencia;

	public EdErroresDet() {
	}

	public EdErroresDet(EdErroresDetId id, EdErrores edErrores) {
		this.id = id;
		this.edErrores = edErrores;
	}

	public EdErroresDet(EdErroresDetId id, EdErrores edErrores, String xinconsistencia) {
		this.id = id;
		this.edErrores = edErrores;
		this.xinconsistencia = xinconsistencia;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "ccorrelativo", column = @Column(name = "C_CORRELATIVO", nullable = false, precision = 18, scale = 0)),
			@AttributeOverride(name = "cdeclaracion", column = @Column(name = "C_DECLARACION", nullable = false, precision = 18, scale = 0)),
			@AttributeOverride(name = "cregla", column = @Column(name = "C_REGLA", nullable = false, length = 25)) })
	public EdErroresDetId getId() {
		return this.id;
	}

	public void setId(EdErroresDetId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns( {
			@JoinColumn(name = "C_CORRELATIVO", referencedColumnName = "C_CORRELATIVO", nullable = false, insertable = false, updatable = false),
			@JoinColumn(name = "C_DECLARACION", referencedColumnName = "C_DECLARACION", nullable = false, insertable = false, updatable = false) })
	public EdErrores getEdErrores() {
		return this.edErrores;
	}

	public void setEdErrores(EdErrores edErrores) {
		this.edErrores = edErrores;
	}

	@Column(name = "X_INCONSISTENCIA", length = 80)
	public String getXinconsistencia() {
		return this.xinconsistencia;
	}

	public void setXinconsistencia(String xinconsistencia) {
		this.xinconsistencia = xinconsistencia;
	}

}
